package play.functional

val upperCase0: (String) -> String = fun(str: String): String {
    return str.uppercase()
}

val upperCase1: (String) -> String = { str: String -> str.uppercase() }

val upperCase2: (String) -> String = { str -> str.uppercase() }

val upperCase3 = { str: String -> str.uppercase() }

// val upperCase4 = { str -> str.toUpperCase() }                          

val upperCase5: (String) -> String = { it.uppercase() }

val upperCase6: (String) -> String = String::uppercase

fun main() {
    println(upperCase0("hello"))
    println(upperCase1("hello"))
    println(upperCase2("hello"))
    println(upperCase3("hello"))
    println(upperCase5("hello"))
    println(upperCase6("hello"))
}
